home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 404_02 / Discussion < prev    next >
Mailbox/MIME Entity  |  1993-07-17  |  8.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Mailbox/MIME Entity (archive/mbox).

You can browse this item here: Discussion

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file C++ source text default
99% file C source, ASCII text default
71% TrID Standard Unix Mailbox default
28% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 63 6f 65 | 74 6d 65 75 72 20 4d 6f |From coe|tmeur Mo|
|00000010| 6e 20 4a 75 6c 20 31 39 | 20 31 34 3a 30 38 3a 34 |n Jul 19| 14:08:4|
|00000020| 33 20 31 39 39 33 0a 54 | 6f 3a 20 72 61 6d 61 6e |3 1993.T|o: raman|
|00000030| 61 6e 64 40 74 68 6f 72 | 2e 65 63 65 2e 75 63 2e |and@thor|.ece.uc.|
|00000040| 45 44 55 0a 53 75 62 6a | 65 63 74 3a 20 52 65 3a |EDU.Subj|ect: Re:|
|00000050| 20 66 6c 65 78 2b 2b 2f | 62 69 73 6f 6e 2b 2b 0a | flex++/|bison++.|
|00000060| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 58 2d |Content-|Type: X-|
|00000070| 73 75 6e 2d 61 74 74 61 | 63 68 6d 65 6e 74 0a 43 |sun-atta|chment.C|
|00000080| 6f 6e 74 65 6e 74 2d 4c | 65 6e 67 74 68 3a 20 38 |ontent-L|ength: 8|
|00000090| 33 38 32 0a 58 2d 4c 69 | 6e 65 73 3a 20 33 31 32 |382.X-Li|nes: 312|
|000000a0| 0a 53 74 61 74 75 73 3a | 20 52 4f 0a 0a 2d 2d 2d |.Status:| RO..---|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 0a | 58 2d 53 75 6e 2d 44 61 |-------.|X-Sun-Da|
|000000c0| 74 61 2d 54 79 70 65 3a | 20 74 65 78 74 0a 58 2d |ta-Type:| text.X-|
|000000d0| 53 75 6e 2d 44 61 74 61 | 2d 44 65 73 63 72 69 70 |Sun-Data|-Descrip|
|000000e0| 74 69 6f 6e 3a 20 74 65 | 78 74 0a 58 2d 53 75 6e |tion: te|xt.X-Sun|
|000000f0| 2d 44 61 74 61 2d 4e 61 | 6d 65 3a 20 74 65 78 74 |-Data-Na|me: text|
|00000100| 0a 58 2d 53 75 6e 2d 43 | 6f 6e 74 65 6e 74 2d 4c |.X-Sun-C|ontent-L|
|00000110| 69 6e 65 73 3a 20 31 31 | 34 0a 0a 0a 3e 20 46 72 |ines: 11|4...> Fr|
|00000120| 6f 6d 20 72 6f 6f 74 20 | 54 68 75 20 4a 75 6c 20 |om root |Thu Jul |
|00000130| 31 35 20 32 30 3a 30 30 | 3a 32 37 20 31 39 39 33 |15 20:00|:27 1993|
|00000140| 0a 3e 20 3e 46 72 6f 6d | 20 72 61 6d 61 6e 61 6e |.> >From| ramanan|
|00000150| 64 40 74 68 6f 72 2e 65 | 63 65 2e 75 63 2e 45 44 |d@thor.e|ce.uc.ED|
|00000160| 55 20 54 68 75 20 4a 75 | 6c 20 31 35 20 32 30 3a |U Thu Ju|l 15 20:|
|00000170| 30 30 3a 32 37 20 31 39 | 39 33 0a 3e 20 44 61 74 |00:27 19|93.> Dat|
|00000180| 65 3a 20 31 35 20 4a 75 | 6c 20 39 33 20 31 33 3a |e: 15 Ju|l 93 13:|
|00000190| 35 37 3a 32 37 2d 30 34 | 30 30 0a 3e 20 46 72 6f |57:27-04|00.> Fro|
|000001a0| 6d 3a 20 4a 6f 68 6e 20 | 48 6f 6c 6d 65 73 20 53 |m: John |Holmes S|
|000001b0| 72 20 3c 72 61 6d 61 6e | 61 6e 64 40 74 68 6f 72 |r <raman|and@thor|
|000001c0| 2e 65 63 65 2e 75 63 2e | 45 44 55 3e 0a 3e 20 53 |.ece.uc.|EDU>.> S|
|000001d0| 75 62 6a 65 63 74 3a 20 | 66 6c 65 78 2b 2b 2f 62 |ubject: |flex++/b|
|000001e0| 69 73 6f 6e 2b 2b 0a 3e | 20 54 6f 3a 20 63 6f 65 |ison++.>| To: coe|
|000001f0| 74 6d 65 75 72 40 69 63 | 64 63 2e 66 72 0a 3e 20 |tmeur@ic|dc.fr.> |
|00000200| 4d 49 4d 45 2d 76 65 72 | 73 69 6f 6e 3a 20 31 2e |MIME-ver|sion: 1.|
|00000210| 30 0a 3e 20 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |0.> Cont|ent-Type|
|00000220| 3e 20 3a 20 3e 20 74 65 | 78 74 2f 70 6c 61 69 6e |> : > te|xt/plain|
|00000230| 3e 20 3b 20 3e 20 63 68 | 61 72 73 65 74 3d 55 53 |> ; > ch|arset=US|
|00000240| 2d 41 53 43 49 49 3e 20 | 0a 3e 20 43 6f 6e 74 65 |-ASCII> |.> Conte|
|00000250| 6e 74 2d 74 72 61 6e 73 | 66 65 72 2d 65 6e 63 6f |nt-trans|fer-enco|
|00000260| 64 69 6e 67 3a 20 37 62 | 69 74 0a 3e 20 0a 3e 20 |ding: 7b|it.> .> |
|00000270| 48 65 6c 6c 6f 20 41 6c | 61 69 6e 2c 0a 3e 20 0a |Hello Al|ain,.> .|
|00000280| 3e 20 49 20 72 65 63 65 | 6e 74 6c 79 20 70 6f 72 |> I rece|ntly por|
|00000290| 74 65 64 20 74 68 65 20 | 66 6c 65 78 2b 2b 2f 62 |ted the |flex++/b|
|000002a0| 69 73 6f 6e 2b 2b 20 73 | 6f 66 74 77 61 72 65 20 |ison++ s|oftware |
|000002b0| 74 68 61 74 20 79 6f 75 | 20 68 61 76 65 20 70 75 |that you| have pu|
|000002c0| 74 20 75 70 20 6f 6e 20 | 74 68 65 0a 3e 20 66 74 |t up on |the.> ft|
|000002d0| 70 20 73 65 72 76 65 72 | 20 75 6e 64 65 72 20 63 |p server| under c|
|000002e0| 6f 6d 70 2e 63 6f 6d 70 | 69 6c 65 72 73 2e 20 0a |omp.comp|ilers. .|
|000002f0| 3e 20 0a 3e 20 46 69 72 | 73 74 20 6f 66 20 61 6c |> .> Fir|st of al|
|00000300| 6c 20 49 20 77 6f 75 6c | 64 20 6c 69 6b 65 20 74 |l I woul|d like t|
|00000310| 6f 20 63 6f 6d 70 6c 65 | 6d 65 6e 74 20 79 6f 75 |o comple|ment you|
|00000320| 20 6f 6e 20 61 20 6a 6f | 62 20 77 65 6c 6c 20 75 | on a jo|b well u|
|00000330| 6e 64 65 72 61 6b 74 65 | 6e 2e 20 54 68 65 0a 3e |nderakte|n. The.>|
|00000340| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 69 | documen|tation i|
|00000350| 73 20 71 75 69 74 65 20 | 62 65 6e 65 66 69 63 69 |s quite |benefici|
|00000360| 61 6c 2e 20 0a 3e 20 0a | 3e 20 48 6f 77 65 76 65 |al. .> .|> Howeve|
|00000370| 72 20 49 20 68 61 76 65 | 20 62 65 65 6e 20 68 61 |r I have| been ha|
|00000380| 76 69 6e 67 20 73 6f 6d | 65 20 70 72 6f 62 6c 65 |ving som|e proble|
|00000390| 6d 73 20 77 69 74 68 20 | 67 65 6e 65 72 61 74 69 |ms with |generati|
|000003a0| 6e 67 20 6d 75 6c 74 69 | 70 6c 65 20 70 61 72 73 |ng multi|ple pars|
|000003b0| 65 72 73 0a 3e 20 69 6e | 20 74 68 65 20 73 61 6d |ers.> in| the sam|
|000003c0| 65 20 65 78 65 63 75 74 | 61 62 6c 65 2e 20 49 74 |e execut|able. It|
|000003d0| 20 69 73 20 71 75 69 74 | 65 20 70 6f 73 73 69 62 | is quit|e possib|
|000003e0| 6c 65 20 74 68 61 74 20 | 6d 79 20 75 6e 64 65 72 |le that |my under|
|000003f0| 73 74 61 6e 64 69 6e 67 | 20 6f 66 20 74 68 65 0a |standing| of the.|
|00000400| 3e 20 66 75 6c 6c 20 63 | 61 70 61 62 69 6c 69 74 |> full c|apabilit|
|00000410| 69 65 73 20 6f 66 20 74 | 68 65 20 6e 6f 74 69 6f |ies of t|he notio|
|00000420| 6e 73 20 6f 66 20 63 6c | 61 73 73 20 65 74 63 2e |ns of cl|ass etc.|
|00000430| 20 61 72 65 20 6e 6f 74 | 20 71 75 69 74 65 20 75 | are not| quite u|
|00000440| 70 20 74 6f 20 74 68 65 | 0a 3e 20 6d 61 72 6b 2e |p to the|.> mark.|
|00000450| 20 49 20 77 6f 75 6c 64 | 20 61 70 70 72 65 63 69 | I would| appreci|
|00000460| 61 74 65 20 61 6e 79 20 | 68 65 6c 70 20 79 6f 75 |ate any |help you|
|00000470| 20 63 61 6e 20 70 72 6f | 76 69 64 65 2e 0a 3e 20 | can pro|vide..> |
|00000480| 0a 3e 20 0a 3e 20 49 20 | 68 61 76 65 20 74 72 69 |.> .> I |have tri|
|00000490| 65 64 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ed the f|ollowing|
|000004a0| 20 61 70 70 72 6f 61 63 | 68 2e 20 49 66 20 74 68 | approac|h. If th|
|000004b0| 65 72 65 20 69 73 20 61 | 20 62 65 74 74 65 72 20 |ere is a| better |
|000004c0| 77 61 79 2c 20 70 6c 65 | 61 73 65 20 6c 65 74 0a |way, ple|ase let.|
|000004d0| 3e 20 6d 65 20 6b 6e 6f | 77 2e 0a 3e 20 0a 3e 20 |> me kno|w..> .> |
|000004e0| 0a 3e 20 09 50 72 65 70 | 61 72 65 20 74 77 6f 20 |.> .Prep|are two |
|000004f0| 62 69 73 6f 6e 2b 2b 20 | 66 69 6c 65 73 2e 20 45 |bison++ |files. E|
|00000500| 61 63 68 20 6f 66 20 74 | 68 65 6d 20 64 65 63 6c |ach of t|hem decl|
|00000510| 61 72 65 73 20 61 20 64 | 69 66 66 65 72 65 6e 74 |ares a d|ifferent|
|00000520| 20 63 6c 61 73 73 0a 3e | 20 09 66 6f 72 20 74 68 | class.>| .for th|
|00000530| 65 20 70 61 72 73 65 72 | 2e 20 45 61 63 68 20 6f |e parser|. Each o|
|00000540| 66 20 74 68 65 6d 20 64 | 65 63 6c 61 72 65 73 20 |f them d|eclares |
|00000550| 69 74 73 20 4c 45 58 5f | 42 4f 44 59 20 61 73 20 |its LEX_|BODY as |
|00000560| 3d 20 30 20 28 69 2e 65 | 2e 20 61 0a 3e 20 09 70 |= 0 (i.e|. a.> .p|
|00000570| 75 72 65 20 76 69 72 74 | 75 61 6c 20 66 75 6e 63 |ure virt|ual func|
|00000580| 74 69 6f 6e 29 2e 20 50 | 72 65 70 61 72 65 20 74 |tion). P|repare t|
|00000590| 77 6f 20 66 6c 65 78 2b | 2b 20 66 69 6c 65 73 2e |wo flex+|+ files.|
|000005a0| 20 45 61 63 68 20 6f 66 | 20 74 68 65 6d 0a 3e 20 | Each of| them.> |
|000005b0| 09 69 6e 68 65 72 69 74 | 73 20 74 68 65 20 70 72 |.inherit|s the pr|
|000005c0| 6f 70 65 72 74 69 65 73 | 20 6f 66 20 74 68 65 20 |operties| of the |
|000005d0| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 70 61 |correspo|nding pa|
|000005e0| 72 73 65 72 20 63 6c 61 | 73 73 20 61 6e 64 20 64 |rser cla|ss and d|
|000005f0| 65 66 69 6e 65 73 0a 3e | 20 09 74 68 65 20 6c 65 |efines.>| .the le|
|00000600| 78 69 63 61 6c 20 61 6e | 61 6c 79 73 65 72 20 66 |xical an|alyser f|
|00000610| 75 6e 63 74 69 6f 6e 73 | 2e 20 0a 3e 20 0a 3e 20 |unctions|. .> .> |
|00000620| 09 53 6f 20 49 20 6e 6f | 77 20 68 61 76 65 20 74 |.So I no|w have t|
|00000630| 77 6f 20 73 65 74 73 20 | 6f 66 20 68 65 61 64 65 |wo sets |of heade|
|00000640| 72 20 66 69 6c 65 73 2e | 20 0a 3e 20 0a 3e 20 09 |r files.| .> .> .|
|00000650| 09 61 2e 20 70 61 72 73 | 65 72 31 2e 68 20 61 6e |.a. pars|er1.h an|
|00000660| 64 20 6c 65 78 31 2e 68 | 0a 3e 20 09 09 62 2e 20 |d lex1.h|.> ..b. |
|00000670| 70 61 72 73 65 72 32 2e | 68 20 61 6e 64 20 6c 65 |parser2.|h and le|
|00000680| 78 32 2e 68 0a 3e 20 0a | 3e 20 09 0a 3e 20 0a 3e |x2.h.> .|> ..> .>|
|00000690| 20 0a 3e 20 45 61 63 68 | 20 73 65 74 20 6f 66 20 | .> Each| set of |
|000006a0| 70 61 72 73 65 72 2f 6c | 65 78 69 63 61 6c 20 61 |parser/l|exical a|
|000006b0| 6e 61 6c 79 73 65 72 20 | 69 6e 64 69 76 69 64 75 |nalyser |individu|
|000006c0| 61 6c 6c 79 20 63 6f 6d | 70 69 6c 65 73 20 63 6f |ally com|piles co|
|000006d0| 72 72 65 63 74 6c 79 0a | 3e 20 77 69 74 68 20 74 |rrectly.|> with t|
|000006e0| 68 65 20 6c 61 74 65 73 | 74 20 67 6e 75 20 63 2b |he lates|t gnu c+|
|000006f0| 2b 20 20 63 6f 6d 70 69 | 6c 65 72 2e 20 48 6f 77 |+ compi|ler. How|
|00000700| 65 76 65 72 2c 20 69 66 | 20 49 20 74 72 79 20 74 |ever, if| I try t|
|00000710| 6f 20 69 6e 63 6c 75 64 | 65 20 62 6f 74 68 0a 3e |o includ|e both.>|
|00000720| 20 74 68 65 20 6c 65 78 | 69 63 61 6c 20 68 65 61 | the lex|ical hea|
|00000730| 64 65 72 20 66 69 6c 65 | 73 20 28 6c 65 78 31 2e |der file|s (lex1.|
|00000740| 63 20 61 6e 64 20 6c 65 | 78 32 2e 63 29 20 69 6e |c and le|x2.c) in|
|00000750| 20 74 68 65 20 6d 61 69 | 6e 20 66 69 6c 65 2c 20 | the mai|n file, |
|00000760| 49 20 67 65 74 20 73 79 | 6e 74 61 78 0a 3e 20 65 |I get sy|ntax.> e|
|00000770| 72 72 6f 72 73 2e 20 54 | 68 65 20 72 65 61 73 6f |rrors. T|he reaso|
|00000780| 6e 20 69 73 20 69 6e 20 | 74 68 65 20 66 69 72 73 |n is in |the firs|
|00000790| 74 20 74 77 6f 20 6c 69 | 6e 65 73 20 6f 66 20 74 |t two li|nes of t|
|000007a0| 68 65 73 65 20 68 65 61 | 64 65 72 20 66 69 6c 65 |hese hea|der file|
|000007b0| 73 2e 20 54 68 65 79 0a | 3e 20 61 72 65 20 64 75 |s. They.|> are du|
|000007c0| 70 6c 69 63 61 74 65 64 | 20 68 65 72 65 20 62 65 |plicated| here be|
|000007d0| 6c 6f 77 3a 0a 3e 20 0a | 3e 20 09 23 69 66 6e 64 |low:.> .|> .#ifnd|
|000007e0| 65 66 20 46 4c 45 58 5f | 48 45 41 44 45 52 5f 6c |ef FLEX_|HEADER_l|
|000007f0| 65 78 5f 5f 68 0a 3e 20 | 09 23 64 65 66 69 6e 65 |ex__h.> |.#define|
|00000800| 20 46 4c 45 58 5f 48 45 | 41 44 45 52 5f 6c 65 78 | FLEX_HE|ADER_lex|
|00000810| 5f 5f 68 0a 3e 20 09 2e | 2e 2e 0a 3e 20 09 2e 2e |__h.> ..|...> ...|
|00000820| 2e 0a 3e 20 0a 3e 20 0a | 3e 20 53 69 6e 63 65 20 |..> .> .|> Since |
|00000830| 62 6f 74 68 20 74 68 65 | 73 65 20 66 69 6c 65 73 |both the|se files|
|00000840| 20 64 65 66 69 6e 65 20 | 74 68 65 20 73 61 6d 65 | define |the same|
|00000850| 20 73 79 6d 62 6f 6c 20 | 46 4c 45 58 5f 48 45 41 | symbol |FLEX_HEA|
|00000860| 44 45 52 5f 6c 65 78 5f | 5f 68 2c 0a 3e 20 6f 62 |DER_lex_|_h,.> ob|
|00000870| 76 69 6f 75 73 6c 79 20 | 74 68 65 20 73 65 63 6f |viously |the seco|
|00000880| 6e 64 20 74 69 6d 65 20 | 74 68 61 74 20 49 20 69 |nd time |that I i|
|00000890| 6e 63 6c 75 64 65 20 74 | 68 65 20 68 65 61 64 65 |nclude t|he heade|
|000008a0| 72 20 66 69 6c 65 2c 20 | 69 74 20 69 73 20 69 67 |r file, |it is ig|
|000008b0| 6e 6f 72 65 64 0a 3e 20 | 62 79 20 74 68 65 20 70 |nored.> |by the p|
|000008c0| 72 65 70 72 6f 63 65 73 | 73 6f 72 2e 20 0a 3e 20 |reproces|sor. .> |
|000008d0| 0a 3e 20 43 61 6e 20 79 | 6f 75 20 67 69 76 65 20 |.> Can y|ou give |
|000008e0| 6d 65 20 73 6f 6d 65 20 | 73 6f 6c 75 74 69 6f 6e |me some |solution|
|000008f0| 73 20 74 6f 20 74 68 69 | 73 2e 20 45 69 74 68 65 |s to thi|s. Eithe|
|00000900| 72 20 49 20 63 6f 75 6c | 64 20 73 6f 6d 65 68 6f |r I coul|d someho|
|00000910| 77 20 72 65 6e 61 6d 65 | 20 74 68 69 73 0a 3e 20 |w rename| this.> |
|00000920| 73 79 6d 62 6f 6c 20 2c | 20 6f 72 20 79 6f 75 20 |symbol ,| or you |
|00000930| 68 61 76 65 20 20 61 20 | 62 65 74 74 65 72 20 63 |have a |better c|
|00000940| 6c 61 73 73 20 68 69 65 | 72 61 72 63 68 79 20 74 |lass hie|rarchy t|
|00000950| 68 61 74 20 49 20 61 6d | 20 75 6e 61 77 61 72 65 |hat I am| unaware|
|00000960| 20 6f 66 0a 3e 20 63 75 | 72 72 65 6e 74 6c 79 2e | of.> cu|rrently.|
|00000970| 20 0a 3e 20 0a 0a 0a 0a | 09 54 68 65 20 77 61 79 | .> ....|.The way|
|00000980| 20 77 65 20 63 61 6e 20 | 75 73 65 20 6d 75 6c 74 | we can |use mult|
|00000990| 69 70 6c 65 20 70 61 72 | 73 65 72 20 6f 72 20 73 |iple par|ser or s|
|000009a0| 63 61 6e 6e 65 72 20 69 | 73 20 62 79 20 63 68 61 |canner i|s by cha|
|000009b0| 6e 67 69 6e 67 0a 20 20 | 20 74 68 65 20 6e 61 6d |nging. | the nam|
|000009c0| 65 20 6f 66 20 74 68 65 | 20 73 63 61 6e 6e 65 72 |e of the| scanner|
|000009d0| 2f 70 61 72 73 65 72 20 | 77 69 74 68 20 74 68 65 |/parser |with the|
|000009e0| 20 64 69 72 65 63 74 69 | 76 65 20 25 6e 61 6d 65 | directi|ve %name|
|000009f0| 2e 20 69 74 20 69 73 0a | 20 20 20 45 53 53 45 4e |. it is.| ESSEN|
|00000a00| 54 49 41 4c 2e 20 42 79 | 20 64 65 66 61 75 6c 74 |TIAL. By| default|
|00000a10| 20 61 6e 64 20 66 6f 72 | 20 63 6f 6d 70 61 74 69 | and for| compati|
|00000a20| 62 69 6c 69 74 79 20 74 | 68 65 20 6e 61 6d 65 20 |bility t|he name |
|00000a30| 69 73 20 73 65 74 20 74 | 6f 20 27 6c 65 78 27 0a |is set t|o 'lex'.|
|00000a40| 20 20 20 61 6e 64 20 27 | 70 61 72 73 65 27 2c 20 | and '|parse', |
|00000a50| 62 75 74 20 69 74 20 73 | 68 6f 75 6c 64 20 62 65 |but it s|hould be|
|00000a60| 20 63 68 61 6e 67 65 64 | 20 74 6f 20 61 20 64 69 | changed| to a di|
|00000a70| 66 66 65 72 65 6e 74 20 | 6e 61 6d 65 20 66 6f 72 |fferent |name for|
|00000a80| 20 65 61 63 68 0a 20 20 | 20 70 61 72 73 65 72 2f | each. | parser/|
|00000a90| 73 63 61 6e 6e 65 72 2e | 20 46 75 72 74 68 65 72 |scanner.| Further|
|00000aa0| 2c 20 74 68 65 20 73 63 | 61 6e 6e 65 72 20 61 6e |, the sc|anner an|
|00000ab0| 64 20 70 61 72 73 65 72 | 20 6d 75 73 74 20 6e 6f |d parser| must no|
|00000ac0| 74 20 68 61 76 65 20 74 | 68 65 0a 20 20 20 73 61 |t have t|he. sa|
|00000ad0| 6d 65 20 6e 61 6d 65 2e | 20 74 68 65 20 6e 61 6d |me name.| the nam|
|00000ae0| 65 20 67 69 76 65 6e 20 | 69 73 20 75 73 65 64 20 |e given |is used |
|00000af0| 61 73 20 74 68 65 20 63 | 6c 61 73 73 20 6e 61 6d |as the c|lass nam|
|00000b00| 65 2c 20 61 6e 64 20 74 | 6f 20 62 75 69 6c 64 0a |e, and t|o build.|
|00000b10| 20 20 20 6d 61 6e 79 20 | 73 79 6d 62 6f 6c 20 6e | many |symbol n|
|00000b20| 61 6d 65 73 2e 20 53 6f | 20 79 6f 75 20 73 68 6f |ames. So| you sho|
|00000b30| 75 6c 64 20 67 69 76 65 | 20 61 20 25 6e 61 6d 65 |uld give| a %name|
|00000b40| 20 64 69 72 65 63 74 69 | 76 65 2c 20 62 65 66 6f | directi|ve, befo|
|00000b50| 72 65 20 61 6e 79 0a 20 | 20 20 6f 74 68 65 72 20 |re any. | other |
|00000b60| 69 6e 20 74 68 65 20 66 | 6c 65 78 2b 2b 20 61 6e |in the f|lex++ an|
|00000b70| 64 20 62 69 73 6f 6e 2b | 2b 20 66 69 6c 65 73 2e |d bison+|+ files.|
|00000b80| 20 49 66 20 61 6c 6c 20 | 74 68 65 20 68 65 61 64 | If all |the head|
|00000b90| 65 72 20 75 73 65 20 74 | 68 65 0a 20 20 20 73 79 |er use t|he. sy|
|00000ba0| 6d 62 6f 6c 20 46 4c 45 | 58 5f 48 45 41 44 45 52 |mbol FLE|X_HEADER|
|00000bb0| 5f 6c 65 78 5f 5f 68 20 | 69 66 20 73 68 6f 75 6c |_lex__h |if shoul|
|00000bc0| 20 6d 65 61 6e 20 74 68 | 61 74 20 74 68 65 79 20 | mean th|at they |
|00000bd0| 75 73 65 20 74 68 65 20 | 73 61 6d 65 0a 20 20 20 |use the |same. |
|00000be0| 25 6e 61 6d 65 2e 20 49 | 66 20 69 74 20 69 73 20 |%name. I|f it is |
|00000bf0| 6e 6f 74 20 74 68 65 20 | 63 61 73 65 2c 20 69 74 |not the |case, it|
|00000c00| 20 69 73 20 61 20 76 65 | 72 79 20 69 6d 70 6f 72 | is a ve|ry impor|
|00000c10| 74 61 6e 74 20 62 75 67 | 2e 20 49 20 77 61 73 20 |tant bug|. I was |
|00000c20| 6e 6f 74 0a 20 20 20 61 | 62 6c 65 20 74 6f 20 72 |not. a|ble to r|
|00000c30| 65 70 72 6f 64 75 63 65 | 20 69 74 20 77 69 74 68 |eproduce| it with|
|00000c40| 20 74 68 65 20 64 61 74 | 61 20 49 20 68 61 76 65 | the dat|a I have|
|00000c50| 2e 0a 0a 09 54 68 65 20 | 77 61 79 20 74 6f 20 63 |....The |way to c|
|00000c60| 6f 6d 75 6e 69 63 61 74 | 65 20 62 65 74 77 65 65 |omunicat|e betwee|
|00000c70| 6e 20 74 68 65 20 73 63 | 61 6e 6e 65 72 20 61 6e |n the sc|anner an|
|00000c80| 64 20 74 68 65 20 70 61 | 72 73 65 72 20 69 73 20 |d the pa|rser is |
|00000c90| 6e 6f 74 0a 20 20 20 61 | 20 74 72 69 76 69 61 6c |not. a| trivial|
|00000ca0| 20 63 68 6f 69 63 2c 20 | 61 6e 64 20 61 74 20 6f | choic, |and at o|
|00000cb0| 75 72 20 73 69 74 65 20 | 77 65 20 64 69 73 63 75 |ur site |we discu|
|00000cc0| 73 73 65 64 20 6d 75 63 | 68 20 61 62 6f 75 74 20 |ssed muc|h about |
|00000cd0| 69 74 2e 20 54 68 65 0a | 20 20 20 70 72 6f 62 6c |it. The.| probl|
|00000ce0| 65 6d 73 20 61 72 65 20 | 63 6f 6d 70 6c 65 78 20 |ems are |complex |
|00000cf0| 73 69 6e 63 65 20 74 68 | 65 20 73 63 61 6e 6e 65 |since th|e scanne|
|00000d00| 72 20 75 73 65 20 70 61 | 72 73 65 72 20 63 6f 6e |r use pa|rser con|
|00000d10| 73 74 61 6e 74 20 66 6f | 72 20 74 6f 6b 65 6e 0a |stant fo|r token.|
|00000d20| 20 20 20 49 44 2c 20 74 | 68 65 20 70 61 72 73 65 | ID, t|he parse|
|00000d30| 72 20 75 73 65 20 74 68 | 65 20 73 63 61 6e 6e 65 |r use th|e scanne|
|00000d40| 72 20 66 75 6e 63 74 69 | 6f 6e 20 61 73 20 74 6f |r functi|on as to|
|00000d50| 6b 65 6e 20 66 75 72 6e | 69 73 68 65 72 2c 20 61 |ken furn|isher, a|
|00000d60| 6e 64 20 73 6f 0a 20 20 | 20 6f 6e 2e 2e 2e 0a 0a |nd so. | on.....|
|00000d70| 09 54 68 65 20 77 61 79 | 20 74 68 61 74 20 77 65 |.The way| that we|
|00000d80| 20 75 73 65 64 20 69 73 | 20 74 6f 20 63 72 65 61 | used is| to crea|
|00000d90| 74 65 20 61 20 64 65 72 | 69 76 65 64 20 63 6c 61 |te a der|ived cla|
|00000da0| 73 73 20 66 72 6f 6d 20 | 74 68 65 0a 20 20 20 70 |ss from |the. p|
|00000db0| 61 72 73 65 72 20 63 6c | 61 73 73 2c 20 63 6f 6e |arser cl|ass, con|
|00000dc0| 74 61 69 6e 69 6e 67 20 | 74 68 65 20 73 63 61 6e |taining |the scan|
|00000dd0| 6e 65 72 20 69 74 73 65 | 6c 66 2c 20 61 6e 64 20 |ner itse|lf, and |
|00000de0| 72 65 64 65 66 69 6e 69 | 6e 67 20 74 68 65 0a 20 |redefini|ng the. |
|00000df0| 20 20 74 6f 6b 65 6e 20 | 72 65 61 64 65 72 20 66 | token |reader f|
|00000e00| 75 6e 63 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 70 |unction |of the p|
|00000e10| 61 72 73 65 72 20 74 6f | 20 63 61 6c 6c 20 74 68 |arser to| call th|
|00000e20| 65 20 73 63 61 6e 6e 65 | 72 20 66 75 6e 63 74 69 |e scanne|r functi|
|00000e30| 6f 6e 20 6f 66 0a 20 20 | 20 74 68 65 20 73 63 61 |on of. | the sca|
|00000e40| 6e 6e 65 72 2e 20 49 74 | 20 73 65 65 6d 73 20 67 |nner. It| seems g|
|00000e50| 6f 6f 64 20 66 6f 72 20 | 6d 61 6e 79 20 72 65 61 |ood for |many rea|
|00000e60| 73 6f 6e 73 3a 0a 0a 09 | 20 20 20 2d 20 74 68 65 |sons:...| - the|
|00000e70| 20 63 6f 6d 70 69 6c 65 | 72 20 28 69 65 20 70 61 | compile|r (ie pa|
|00000e80| 72 73 65 72 2b 73 63 61 | 6e 6e 65 72 29 20 49 53 |rser+sca|nner) IS|
|00000e90| 20 65 73 73 65 6e 74 69 | 61 6c 6c 79 20 61 20 50 | essenti|ally a P|
|00000ea0| 41 52 53 45 52 2c 0a 09 | 20 20 20 20 20 74 68 61 |ARSER,..| tha|
|00000eb0| 74 20 55 53 45 20 61 20 | 70 61 72 74 69 63 75 6c |t USE a |particul|
|00000ec0| 61 72 20 53 43 41 4e 4e | 45 52 20 74 6f 20 67 69 |ar SCANN|ER to gi|
|00000ed0| 76 65 20 74 6f 6b 65 6e | 73 2e 0a 0a 09 20 20 20 |ve token|s.... |
|00000ee0| 2d 20 74 68 65 20 69 6e | 74 65 72 6d 65 64 69 61 |- the in|termedia|
|00000ef0| 74 65 20 66 75 6e 63 74 | 69 6f 6e 20 74 68 61 74 |te funct|ion that|
|00000f00| 20 67 69 76 65 20 74 6f | 6b 65 6e 73 20 66 72 6f | give to|kens fro|
|00000f10| 6d 20 74 68 65 0a 09 20 | 20 20 20 20 73 63 61 6e |m the.. | scan|
|00000f20| 6e 65 72 20 74 6f 20 74 | 68 65 20 70 61 72 73 65 |ner to t|he parse|
|00000f30| 72 20 69 73 20 61 20 67 | 6f 6f 64 20 70 6c 61 63 |r is a g|ood plac|
|00000f40| 65 20 74 6f 20 70 75 74 | 20 74 72 61 63 65 2c 20 |e to put| trace, |
|00000f50| 61 6e 64 0a 09 20 20 20 | 20 20 6d 61 6e 61 67 65 |and.. | manage|
|00000f60| 6d 65 6e 74 20 66 75 6e | 63 74 69 6f 6e 20 28 6c |ment fun|ction (l|
|00000f70| 69 6e 65 20 63 6f 75 6e | 74 2e 2e 2e 29 0a 0a 09 |ine coun|t...)...|
|00000f80| 20 54 68 65 20 64 65 73 | 69 67 6e 20 77 61 73 20 | The des|ign was |
|00000f90| 73 6f 20 69 6d 70 6f 72 | 74 61 6e 74 20 74 6f 20 |so impor|tant to |
|00000fa0| 65 78 70 6c 61 69 6e 20 | 74 6f 20 6e 65 77 20 75 |explain |to new u|
|00000fb0| 73 65 72 73 20 69 6e 20 | 6f 75 72 0a 20 20 20 20 |sers in |our. |
|00000fc0| 73 69 74 65 2c 20 74 68 | 61 74 20 49 20 64 65 63 |site, th|at I dec|
|00000fd0| 69 64 65 64 20 74 6f 20 | 62 75 69 6c 64 20 61 20 |ided to |build a |
|00000fe0| 74 65 6d 70 6c 61 74 65 | 20 6f 66 20 63 6f 6d 70 |template| of comp|
|00000ff0| 69 6c 65 72 20 74 68 61 | 74 20 69 73 20 61 0a 20 |iler tha|t is a. |
|00001000| 20 20 20 62 61 73 65 20 | 74 6f 20 6d 6f 64 69 66 | base |to modif|
|00001010| 79 2e 20 49 74 20 73 68 | 6f 75 6c 64 20 62 65 20 |y. It sh|ould be |
|00001020| 70 72 65 73 65 6e 74 20 | 69 6e 20 6d 69 73 63 2b |present |in misc+|
|00001030| 2b 2c 20 62 75 74 20 49 | 20 73 65 6e 64 20 69 74 |+, but I| send it|
|00001040| 20 61 73 0a 20 20 20 20 | 61 74 74 61 63 68 6d 65 | as. |attachme|
|00001050| 6e 74 20 28 34 20 66 69 | 6c 65 73 29 2e 0a 0a 09 |nt (4 fi|les)....|
|00001060| 49 20 61 6d 20 63 6f 6e | 63 69 65 6e 74 20 74 68 |I am con|cient th|
|00001070| 61 74 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |at the d|ocumenta|
|00001080| 74 69 6f 6e 20 49 20 68 | 61 76 65 20 67 69 76 65 |tion I h|ave give|
|00001090| 6e 20 69 73 20 76 65 72 | 79 0a 20 20 20 20 74 65 |n is ver|y. te|
|000010a0| 63 68 6e 69 63 61 6c 2c | 20 61 6e 64 20 61 73 73 |chnical,| and ass|
|000010b0| 75 6d 65 20 61 20 64 65 | 65 70 20 6b 6e 6f 77 6c |ume a de|ep knowl|
|000010c0| 65 64 67 65 20 6f 66 20 | 66 6c 65 78 2c 20 62 69 |edge of |flex, bi|
|000010d0| 73 6f 6e 2c 20 43 2f 43 | 2b 2b 2c 20 61 6e 64 0a |son, C/C|++, and.|
|000010e0| 20 20 20 20 73 6f 6d 65 | 20 64 65 73 69 67 6e 20 | some| design |
|000010f0| 65 78 70 65 72 69 65 6e | 63 65 73 2e 0a 0a 0a 09 |experien|ces.....|
|00001100| 50 6c 65 61 73 65 20 74 | 65 6c 6c 20 6d 65 20 77 |Please t|ell me w|
|00001110| 61 73 20 69 73 20 74 68 | 65 20 72 65 73 75 6c 74 |as is th|e result|
|00001120| 20 6f 66 20 79 6f 75 72 | 20 6e 65 77 20 74 72 79 | of your| new try|
|00001130| 2c 20 73 75 63 63 65 73 | 73 66 75 6c 20 6f 72 20 |, succes|sful or |
|00001140| 6e 6f 74 2e 0a 0a 09 48 | 6f 70 69 6e 67 20 49 20 |not....H|oping I |
|00001150| 63 6f 75 6c 64 20 68 65 | 6c 70 20 79 6f 75 2c 20 |could he|lp you, |
|00001160| 42 65 73 74 20 72 65 67 | 61 72 64 2e 0a 0a 0a 09 |Best reg|ard.....|
|00001170| 41 6c 61 69 6e 20 43 6f | 65 74 6d 65 75 72 0a 0a |Alain Co|etmeur..|
|00001180| 20 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 58 2d 53 | .------|----.X-S|
|00001190| 75 6e 2d 44 61 74 61 2d | 54 79 70 65 3a 20 72 64 |un-Data-|Type: rd|
|000011a0| 74 69 2d 73 6f 75 72 63 | 65 2d 6d 61 6b 65 66 69 |ti-sourc|e-makefi|
|000011b0| 6c 65 0a 58 2d 53 75 6e | 2d 44 61 74 61 2d 4e 61 |le.X-Sun|-Data-Na|
|000011c0| 6d 65 3a 20 6d 61 6b 65 | 66 69 6c 65 0a 58 2d 53 |me: make|file.X-S|
|000011d0| 75 6e 2d 43 6f 6e 74 65 | 6e 74 2d 4c 69 6e 65 73 |un-Conte|nt-Lines|
|000011e0| 3a 20 32 38 0a 0a 0a 0a | 2e 53 55 46 46 49 58 45 |: 28....|.SUFFIXE|
|000011f0| 53 20 3a 20 2e 63 63 20 | 2e 79 20 2e 6c 20 24 28 |S : .cc |.y .l $(|
|00001200| 53 55 46 46 49 58 45 53 | 29 0a 0a 2e 63 63 2e 6f |SUFFIXES|)...cc.o|
|00001210| 20 3a 0a 09 43 43 20 20 | 20 2d 49 24 28 43 45 4e | :..CC | -I$(CEN|
|00001220| 54 45 52 43 43 4c 49 42 | 44 49 52 29 2f 69 6e 63 |TERCCLIB|DIR)/inc|
|00001230| 6c 20 2d 63 20 20 24 2a | 2e 63 63 0a 0a 2e 79 2e |l -c $*|.cc...y.|
|00001240| 63 63 20 3a 0a 09 62 69 | 73 6f 6e 2b 2b 20 2d 64 |cc :..bi|son++ -d|
|00001250| 20 20 2d 6f 20 24 2a 2e | 63 63 20 2d 68 20 24 2a | -o $*.|cc -h $*|
|00001260| 2e 68 20 20 24 2a 2e 79 | 0a 2e 6c 2e 63 63 20 3a |.h $*.y|..l.cc :|
|00001270| 0a 09 66 6c 65 78 2b 2b | 20 20 20 20 2d 68 24 2a |..flex++| -h$*|
|00001280| 2e 68 20 2d 6f 24 2a 2e | 63 63 20 24 2a 2e 6c 0a |.h -o$*.|cc $*.l.|
|00001290| 2e 79 2e 68 20 3a 0a 09 | 62 69 73 6f 6e 2b 2b 20 |.y.h :..|bison++ |
|000012a0| 2d 64 20 20 2d 6f 20 24 | 2a 2e 63 63 20 2d 68 20 |-d -o $|*.cc -h |
|000012b0| 24 2a 2e 68 20 20 24 2a | 2e 79 0a 2e 6c 2e 68 20 |$*.h $*|.y..l.h |
|000012c0| 3a 0a 09 66 6c 65 78 2b | 2b 20 20 20 20 2d 68 24 |:..flex+|+ -h$|
|000012d0| 2a 2e 68 20 2d 6f 24 2a | 2e 63 63 20 24 2a 2e 6c |*.h -o$*|.cc $*.l|
|000012e0| 0a 0a 61 6c 6c 20 3a 20 | 63 6f 6d 70 69 6c 65 72 |..all : |compiler|
|000012f0| 0a 0a 4d 79 43 6f 6d 70 | 69 6c 65 72 2e 6f 20 3a |..MyComp|iler.o :|
|00001300| 20 4d 79 43 6f 6d 70 69 | 6c 65 72 2e 63 63 20 4d | MyCompi|ler.cc M|
|00001310| 79 50 61 72 73 65 72 2e | 68 20 4d 79 53 63 61 6e |yParser.|h MyScan|
|00001320| 6e 65 72 2e 68 0a 0a 4d | 79 50 61 72 73 65 72 2e |ner.h..M|yParser.|
|00001330| 6f 20 3a 20 4d 79 50 61 | 72 73 65 72 2e 63 63 20 |o : MyPa|rser.cc |
|00001340| 4d 79 50 61 72 73 65 72 | 2e 68 0a 0a 4d 79 53 63 |MyParser|.h..MySc|
|00001350| 61 6e 6e 65 72 2e 6f 20 | 3a 20 4d 79 53 63 61 6e |anner.o |: MyScan|
|00001360| 6e 65 72 2e 63 63 20 4d | 79 53 63 61 6e 6e 65 72 |ner.cc M|yScanner|
|00001370| 2e 68 20 4d 79 50 61 72 | 73 65 72 2e 68 0a 0a 0a |.h MyPar|ser.h...|
|00001380| 63 6f 6d 70 69 6c 65 72 | 20 3a 20 4d 79 43 6f 6d |compiler| : MyCom|
|00001390| 70 69 6c 65 72 2e 6f 20 | 4d 79 50 61 72 73 65 72 |piler.o |MyParser|
|000013a0| 2e 6f 20 4d 79 53 63 61 | 6e 6e 65 72 2e 6f 0a 09 |.o MySca|nner.o..|
|000013b0| 43 43 20 20 2d 6f 20 24 | 40 20 4d 79 43 6f 6d 70 |CC -o $|@ MyComp|
|000013c0| 69 6c 65 72 2e 6f 20 4d | 79 50 61 72 73 65 72 2e |iler.o M|yParser.|
|000013d0| 6f 20 4d 79 53 63 61 6e | 6e 65 72 2e 6f 0a 0a 2d |o MyScan|ner.o..-|
|000013e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 2d 53 75 6e 2d |--------|-.X-Sun-|
|000013f0| 44 61 74 61 2d 54 79 70 | 65 3a 20 72 64 74 71 2d |Data-Typ|e: rdtq-|
|00001400| 73 6f 75 72 63 65 2d 6c | 0a 58 2d 53 75 6e 2d 44 |source-l|.X-Sun-D|
|00001410| 61 74 61 2d 4e 61 6d 65 | 3a 20 4d 79 53 63 61 6e |ata-Name|: MyScan|
|00001420| 6e 65 72 2e 6c 0a 58 2d | 53 75 6e 2d 43 6f 6e 74 |ner.l.X-|Sun-Cont|
|00001430| 65 6e 74 2d 4c 69 6e 65 | 73 3a 20 34 32 0a 0a 2f |ent-Line|s: 42../|
|00001440| 2a 20 25 5a 25 20 25 4d | 25 20 25 59 25 20 25 51 |* %Z% %M|% %Y% %Q|
|00001450| 25 20 25 49 25 20 25 45 | 25 20 25 55 25 20 28 25 |% %I% %E|% %U% (%|
|00001460| 46 25 29 20 2a 2f 0a 2f | 2a 0a 20 2a 20 4e 6f 6d |F%) */./|*. * Nom|
|00001470| 20 64 75 20 46 69 63 68 | 69 65 72 20 3a 20 09 7c | du Fich|ier : .||
|00001480| 3e 6e 6f 6d 5f 66 69 63 | 68 69 65 72 3c 7c 0a 20 |>nom_fic|hier<|. |
|00001490| 2a 20 54 69 74 72 65 20 | 3a 20 09 09 7c 3e 54 69 |* Titre |: ..|>Ti|
|000014a0| 74 72 65 3c 7c 0a 20 2a | 20 41 75 74 65 75 72 3a |tre<|. *| Auteur:|
|000014b0| 09 09 7c 3e 61 75 74 65 | 75 72 3c 7c 09 09 0a 20 |..|>aute|ur<|... |
|000014c0| 2a 20 44 61 74 65 20 64 | 65 20 63 72 65 61 74 69 |* Date d|e creati|
|000014d0| 6f 6e 20 3a 09 7c 3e 64 | 61 74 65 43 72 65 61 74 |on :.|>d|ateCreat|
|000014e0| 69 6f 6e 3c 7c 0a 20 2a | 2f 0a 2f 2a 20 44 65 73 |ion<|. *|/./* Des|
|000014f0| 63 72 69 70 74 69 6f 6e | 20 3a 0a 20 2a 09 44 6f |cription| :. *.Do|
|00001500| 63 75 6d 65 6e 74 20 64 | 65 20 72 65 66 65 72 65 |cument d|e refere|
|00001510| 6e 63 65 20 3a 20 7c 3e | 64 6f 63 3c 7c 0a 20 2a |nce : |>|doc<|. *|
|00001520| 09 4f 62 6a 65 74 20 3a | 20 7c 3e 6f 62 6a 65 74 |.Objet :| |>objet|
|00001530| 3c 7c 0a 20 2a 0a 20 2a | 2f 0a 2f 2a 20 0a 20 2a |<|. *. *|/./* . *|
|00001540| 20 68 69 73 74 6f 72 69 | 71 75 65 20 3a 0a 20 2a | histori|que :. *|
|00001550| 20 7c 3e 64 61 74 65 3c | 7c 09 7c 3e 61 75 74 65 | |>date<||.|>aute|
|00001560| 75 72 3c 7c 09 7c 3e 6f | 62 6a 65 74 3c 7c 0a 20 |ur<|.|>o|bjet<|. |
|00001570| 2a 2f 0a 2f 2a 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*/./* --|--------|
|00001580| 2d 2d 2d 2d 20 64 65 63 | 6c 61 72 61 74 69 6f 6e |---- dec|laration|
|00001590| 20 73 65 63 74 69 6f 6e | 20 2d 2d 2d 2d 2d 2d 2d | section| -------|
|000015a0| 2d 2d 2d 2d 2d 2d 2d 20 | 2a 2f 0a 25 6e 61 6d 65 |------- |*/.%name|
|000015b0| 20 4d 79 53 63 61 6e 6e | 65 72 0a 0a 25 64 65 66 | MyScann|er..%def|
|000015c0| 69 6e 65 20 4c 45 58 5f | 50 41 52 41 4d 20 59 59 |ine LEX_|PARAM YY|
|000015d0| 5f 4d 79 50 61 72 73 65 | 72 5f 53 54 59 50 45 20 |_MyParse|r_STYPE |
|000015e0| 2a 76 61 6c 2c 59 59 5f | 4d 79 50 61 72 73 65 72 |*val,YY_|MyParser|
|000015f0| 5f 4c 54 59 50 45 20 2a | 6c 6f 63 0a 25 64 65 66 |_LTYPE *|loc.%def|
|00001600| 69 6e 65 20 4d 45 4d 42 | 45 52 53 20 70 75 62 6c |ine MEMB|ERS publ|
|00001610| 69 63 3a 20 69 6e 74 20 | 74 68 65 4c 69 6e 65 2c |ic: int |theLine,|
|00001620| 74 68 65 43 6f 6c 75 6d | 6e 3b 0a 25 64 65 66 69 |theColum|n;.%defi|
|00001630| 6e 65 20 43 4f 4e 53 54 | 52 55 43 54 4f 52 5f 49 |ne CONST|RUCTOR_I|
|00001640| 4e 49 54 20 3a 20 74 68 | 65 4c 69 6e 65 28 31 29 |NIT : th|eLine(1)|
|00001650| 2c 74 68 65 43 6f 6c 75 | 6d 6e 28 31 29 0a 25 68 |,theColu|mn(1).%h|
|00001660| 65 61 64 65 72 7b 20 0a | 23 69 6e 63 6c 75 64 65 |eader{ .|#include|
|00001670| 20 22 4d 79 50 61 72 73 | 65 72 2e 68 22 0a 25 7d | "MyPars|er.h".%}|
|00001680| 0a 0a 25 7b 0a 73 74 61 | 74 69 63 20 63 68 61 72 |..%{.sta|tic char|
|00001690| 20 53 63 63 73 49 64 5b | 5d 3d 22 25 5a 25 20 25 | SccsId[|]="%Z% %|
|000016a0| 4d 25 20 25 59 25 20 25 | 51 25 20 25 49 25 20 25 |M% %Y% %|Q% %I% %|
|000016b0| 45 25 20 25 55 25 20 28 | 25 46 25 29 22 3b 0a 25 |E% %U% (|%F%)";.%|
|000016c0| 7d 0a 0a 2f 2a 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}../* --|--------|
|000016d0| 2d 2d 2d 2d 20 72 75 6c | 65 73 20 73 65 63 74 69 |---- rul|es secti|
|000016e0| 6f 6e 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |on -----|--------|
|000016f0| 2d 20 2a 2f 0a 53 50 41 | 43 45 53 20 5b 20 5c 74 |- */.SPA|CES [ \t|
|00001700| 5d 2b 0a 25 25 0a 22 5c | 6e 22 09 7b 76 61 6c 2d |]+.%%."\|n".{val-|
|00001710| 3e 63 74 79 70 65 3d 27 | 5c 6e 27 3b 0a 20 20 20 |>ctype='|\n';. |
|00001720| 20 20 20 20 20 20 74 68 | 65 4c 69 6e 65 2b 2b 3b | th|eLine++;|
|00001730| 74 68 65 43 6f 6c 75 6d | 6e 3d 31 3b 0a 20 20 20 |theColum|n=1;. |
|00001740| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 4d 79 50 | re|turn MyP|
|00001750| 61 72 73 65 72 3a 3a 45 | 4f 4c 5f 54 4f 4b 45 4e |arser::E|OL_TOKEN|
|00001760| 3b 20 7d 0a 2e 09 7b 0a | 20 20 20 20 20 20 20 20 |; }...{.| |
|00001770| 20 76 61 6c 2d 3e 63 74 | 79 70 65 3d 79 79 74 65 | val->ct|ype=yyte|
|00001780| 78 74 5b 30 5d 3b 0a 20 | 20 20 20 20 20 20 20 20 |xt[0];. | |
|00001790| 74 68 65 43 6f 6c 75 6d | 6e 2b 2b 3b 0a 20 20 20 |theColum|n++;. |
|000017a0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 4d 79 50 | re|turn MyP|
|000017b0| 61 72 73 65 72 3a 3a 43 | 48 41 52 5f 54 4f 4b 45 |arser::C|HAR_TOKE|
|000017c0| 4e 3b 20 7d 0a 3c 3c 45 | 4f 46 3e 3e 20 7b 20 79 |N; }.<<E|OF>> { y|
|000017d0| 79 74 65 72 6d 69 6e 61 | 74 65 28 29 3b 7d 0a 25 |ytermina|te();}.%|
|000017e0| 25 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 58 2d 53 |%.------|----.X-S|
|000017f0| 75 6e 2d 44 61 74 61 2d | 54 79 70 65 3a 20 72 64 |un-Data-|Type: rd|
|00001800| 74 71 2d 73 6f 75 72 63 | 65 2d 79 0a 58 2d 53 75 |tq-sourc|e-y.X-Su|
|00001810| 6e 2d 44 61 74 61 2d 4e | 61 6d 65 3a 20 4d 79 50 |n-Data-N|ame: MyP|
|00001820| 61 72 73 65 72 2e 79 0a | 58 2d 53 75 6e 2d 43 6f |arser.y.|X-Sun-Co|
|00001830| 6e 74 65 6e 74 2d 4c 69 | 6e 65 73 3a 20 35 30 0a |ntent-Li|nes: 50.|
|00001840| 0a 2f 2a 20 25 5a 25 20 | 25 4d 25 20 25 59 25 20 |./* %Z% |%M% %Y% |
|00001850| 25 51 25 20 25 49 25 20 | 25 45 25 20 25 55 25 20 |%Q% %I% |%E% %U% |
|00001860| 28 25 46 25 29 20 2a 2f | 0a 2f 2a 0a 20 2a 20 4e |(%F%) */|./*. * N|
|00001870| 6f 6d 20 64 75 20 46 69 | 63 68 69 65 72 20 3a 20 |om du Fi|chier : |
|00001880| 09 7c 3e 6e 6f 6d 5f 66 | 69 63 68 69 65 72 3c 7c |.|>nom_f|ichier<||
|00001890| 0a 20 2a 20 54 69 74 72 | 65 20 3a 20 09 09 7c 3e |. * Titr|e : ..|>|
|000018a0| 54 69 74 72 65 3c 7c 0a | 20 2a 20 41 75 74 65 75 |Titre<|.| * Auteu|
|000018b0| 72 3a 09 09 7c 3e 61 75 | 74 65 75 72 3c 7c 0a 20 |r:..|>au|teur<|. |
|000018c0| 2a 20 44 61 74 65 20 64 | 65 20 63 72 65 61 74 69 |* Date d|e creati|
|000018d0| 6f 6e 20 3a 09 7c 3e 64 | 61 74 65 43 72 65 61 74 |on :.|>d|ateCreat|
|000018e0| 69 6f 6e 3c 7c 0a 20 2a | 2f 0a 2f 2a 20 44 65 73 |ion<|. *|/./* Des|
|000018f0| 63 72 69 70 74 69 6f 6e | 20 3a 0a 20 2a 09 44 6f |cription| :. *.Do|
|00001900| 63 75 6d 65 6e 74 20 64 | 65 20 72 65 66 65 72 65 |cument d|e refere|
|00001910| 6e 63 65 20 3a 20 7c 3e | 64 6f 63 3c 7c 0a 20 2a |nce : |>|doc<|. *|
|00001920| 09 4f 62 6a 65 74 20 3a | 20 7c 3e 6f 62 6a 65 74 |.Objet :| |>objet|
|00001930| 3c 7c 0a 20 2a 0a 20 2a | 2f 0a 2f 2a 0a 20 2a 20 |<|. *. *|/./*. * |
|00001940| 68 69 73 74 6f 72 69 71 | 75 65 20 3a 0a 20 2a 20 |historiq|ue :. * |
|00001950| 7c 3e 64 61 74 65 3c 7c | 09 7c 3e 61 75 74 65 75 ||>date<||.|>auteu|
|00001960| 72 3c 7c 09 7c 3e 6f 62 | 6a 65 74 3c 7c 0a 20 2a |r<|.|>ob|jet<|. *|
|00001970| 2f 0a 2f 2a 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/./* ---|--------|
|00001980| 2d 2d 2d 20 64 65 63 6c | 61 72 61 74 69 6f 6e 20 |--- decl|aration |
|00001990| 73 65 63 74 69 6f 6e 20 | 2d 2d 2d 2d 2d 2d 2d 2d |section |--------|
|000019a0| 2d 2d 2d 2d 2d 2d 20 2a | 2f 0a 0a 25 6e 61 6d 65 |------ *|/..%name|
|000019b0| 20 4d 79 50 61 72 73 65 | 72 0a 25 64 65 66 69 6e | MyParse|r.%defin|
|000019c0| 65 20 4c 53 50 5f 4e 45 | 45 44 45 44 0a 25 64 65 |e LSP_NE|EDED.%de|
|000019d0| 66 69 6e 65 20 45 52 52 | 4f 52 5f 42 4f 44 59 20 |fine ERR|OR_BODY |
|000019e0| 3d 30 0a 25 64 65 66 69 | 6e 65 20 4c 45 58 5f 42 |=0.%defi|ne LEX_B|
|000019f0| 4f 44 59 20 3d 30 0a 25 | 68 65 61 64 65 72 7b 0a |ODY =0.%|header{.|
|00001a00| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00001a10| 68 3e 0a 25 7d 0a 0a 25 | 75 6e 69 6f 6e 20 7b 0a |h>.%}..%|union {.|
|00001a20| 09 69 6e 74 20 69 74 79 | 70 65 3b 09 2f 2a 20 66 |.int ity|pe;./* f|
|00001a30| 6f 72 20 63 6f 75 6e 74 | 20 2a 2f 0a 09 63 68 61 |or count| */..cha|
|00001a40| 72 20 63 74 79 70 65 3b | 09 2f 2a 20 66 6f 72 20 |r ctype;|./* for |
|00001a50| 63 68 61 72 20 2a 2f 0a | 09 7d 0a 25 74 6f 6b 65 |char */.|.}.%toke|
|00001a60| 6e 20 3c 63 74 79 70 65 | 3e 20 45 4f 4c 5f 54 4f |n <ctype|> EOL_TO|
|00001a70| 4b 45 4e 20 43 48 41 52 | 5f 54 4f 4b 45 4e 0a 25 |KEN CHAR|_TOKEN.%|
|00001a80| 74 79 70 65 20 3c 69 74 | 79 70 65 3e 20 66 69 6c |type <it|ype> fil|
|00001a90| 65 20 6c 69 6e 65 20 6c | 69 6e 65 73 20 63 68 61 |e line l|ines cha|
|00001aa0| 72 73 0a 25 73 74 61 72 | 74 20 66 69 6c 65 0a 0a |rs.%star|t file..|
|00001ab0| 2f 2a 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/* -----|--------|
|00001ac0| 2d 20 72 75 6c 65 73 20 | 73 65 63 74 69 6f 6e 20 |- rules |section |
|00001ad0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 20 2a |--------|------ *|
|00001ae0| 2f 0a 2f 2a 20 53 61 6d | 70 6c 65 20 70 61 72 73 |/./* Sam|ple pars|
|00001af0| 65 72 2e 20 44 6f 65 73 | 20 63 6f 75 6e 74 20 43 |er. Does| count C|
|00001b00| 68 61 72 73 20 69 6e 20 | 61 20 6c 69 6e 65 2c 20 |hars in |a line, |
|00001b10| 61 6e 64 20 6c 69 6e 65 | 73 20 69 6e 20 66 69 6c |and line|s in fil|
|00001b20| 65 20 2a 2f 0a 25 25 0a | 66 69 6c 65 09 3a 20 6c |e */.%%.|file.: l|
|00001b30| 69 6e 65 73 0a 09 7b 70 | 72 69 6e 74 66 28 22 6e |ines..{p|rintf("n|
|00001b40| 6c 69 6e 65 73 3d 25 64 | 5c 6e 22 2c 24 31 29 3b |lines=%d|\n",$1);|
|00001b50| 20 2f 2a 20 73 68 6f 77 | 20 6c 69 6e 65 20 63 6f | /* show| line co|
|00001b60| 75 6e 74 20 2a 2f 7d 0a | 09 3b 0a 6c 69 6e 65 73 |unt */}.|.;.lines|
|00001b70| 20 09 3a 20 6c 69 6e 65 | 20 7b 24 24 3d 31 3b 20 | .: line| {$$=1; |
|00001b80| 2f 2a 20 66 69 72 73 74 | 20 6c 69 6e 65 20 6f 66 |/* first| line of|
|00001b90| 20 61 6c 6c 20 2a 2f 7d | 0a 09 7c 20 6c 69 6e 65 | all */}|..| line|
|00001ba0| 73 20 6c 69 6e 65 20 7b | 24 24 3d 24 31 2b 31 3b |s line {|$$=$1+1;|
|00001bb0| 09 2f 2a 20 63 6f 75 6e | 74 20 6f 6e 65 20 6d 6f |./* coun|t one mo|
|00001bc0| 72 65 20 6c 69 6e 65 20 | 2a 2f 7d 0a 09 3b 0a 6c |re line |*/}..;.l|
|00001bd0| 69 6e 65 20 09 3a 20 63 | 68 61 72 73 20 45 4f 4c |ine .: c|hars EOL|
|00001be0| 5f 54 4f 4b 45 4e 20 7b | 24 24 3d 24 31 3b 70 72 |_TOKEN {|$$=$1;pr|
|00001bf0| 69 6e 74 66 28 22 6e 63 | 68 61 72 73 3d 25 64 5c |intf("nc|hars=%d\|
|00001c00| 6e 22 2c 24 31 29 3b 20 | 2f 2a 20 73 68 6f 77 20 |n",$1); |/* show |
|00001c10| 63 68 61 72 20 63 6f 75 | 6e 74 20 2a 2f 7d 0a 09 |char cou|nt */}..|
|00001c20| 3b 0a 63 68 61 72 73 09 | 3a 20 43 48 41 52 5f 54 |;.chars.|: CHAR_T|
|00001c30| 4f 4b 45 4e 20 7b 20 24 | 24 3d 31 3b 2f 2a 20 66 |OKEN { $|$=1;/* f|
|00001c40| 69 72 73 74 20 63 68 61 | 72 20 6f 66 20 6c 69 6e |irst cha|r of lin|
|00001c50| 65 20 2a 2f 7d 0a 09 7c | 20 63 68 61 72 73 20 43 |e */}..|| chars C|
|00001c60| 48 41 52 5f 54 4f 4b 45 | 4e 20 7b 24 24 3d 24 31 |HAR_TOKE|N {$$=$1|
|00001c70| 2b 31 3b 20 2f 2a 20 63 | 6f 75 6e 74 20 6f 6e 65 |+1; /* c|ount one|
|00001c80| 20 6d 6f 72 65 20 63 68 | 61 72 20 2a 2f 7d 0a 09 | more ch|ar */}..|
|00001c90| 3b 0a 25 25 0a 2f 2a 20 | 2d 2d 2d 2d 2d 2d 2d 2d |;.%%./* |--------|
|00001ca0| 2d 2d 2d 2d 2d 2d 20 62 | 6f 64 79 20 73 65 63 74 |------ b|ody sect|
|00001cb0| 69 6f 6e 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ion ----|--------|
|00001cc0| 2d 2d 20 2a 2f 0a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |-- */.--|--------|
|00001cd0| 0a 58 2d 53 75 6e 2d 44 | 61 74 61 2d 54 79 70 65 |.X-Sun-D|ata-Type|
|00001ce0| 3a 20 72 64 74 71 2d 73 | 6f 75 72 63 65 2d 63 63 |: rdtq-s|ource-cc|
|00001cf0| 0a 58 2d 53 75 6e 2d 44 | 61 74 61 2d 4e 61 6d 65 |.X-Sun-D|ata-Name|
|00001d00| 3a 20 4d 79 43 6f 6d 70 | 69 6c 65 72 2e 63 63 0a |: MyComp|iler.cc.|
|00001d10| 58 2d 53 75 6e 2d 43 6f | 6e 74 65 6e 74 2d 4c 69 |X-Sun-Co|ntent-Li|
|00001d20| 6e 65 73 3a 20 35 32 0a | 0a 73 74 61 74 69 63 20 |nes: 52.|.static |
|00001d30| 63 68 61 72 20 53 63 63 | 73 49 64 5b 5d 3d 22 25 |char Scc|sId[]="%|
|00001d40| 5a 25 20 25 4d 25 20 25 | 59 25 20 25 51 25 20 25 |Z% %M% %|Y% %Q% %|
|00001d50| 49 25 20 25 45 25 20 25 | 55 25 20 28 25 46 25 29 |I% %E% %|U% (%F%)|
|00001d60| 22 3b 0a 2f 2f 0a 2f 2f | 20 4e 6f 6d 20 64 75 20 |";.//.//| Nom du |
|00001d70| 46 69 63 68 69 65 72 20 | 3a 20 09 7c 3e 6e 6f 6d |Fichier |: .|>nom|
|00001d80| 5f 66 69 63 68 69 65 72 | 3c 7c 0a 2f 2f 20 54 69 |_fichier|<|.// Ti|
|00001d90| 74 72 65 20 3a 20 09 09 | 7c 3e 54 69 74 72 65 3c |tre : ..||>Titre<|
|00001da0| 7c 0a 2f 2f 20 41 75 74 | 65 75 72 3a 09 09 7c 3e ||.// Aut|eur:..|>|
|00001db0| 61 75 74 65 75 72 3c 7c | 09 09 0a 2f 2f 20 44 61 |auteur<||...// Da|
|00001dc0| 74 65 20 64 65 20 63 72 | 65 61 74 69 6f 6e 20 3a |te de cr|eation :|
|00001dd0| 09 7c 3e 64 61 74 65 43 | 72 65 61 74 69 6f 6e 3c |.|>dateC|reation<|
|00001de0| 7c 0a 2f 2f 0a 2f 2f 20 | 44 65 73 63 72 69 70 74 ||.//.// |Descript|
|00001df0| 69 6f 6e 20 3a 0a 2f 2f | 09 44 6f 63 75 6d 65 6e |ion :.//|.Documen|
|00001e00| 74 20 64 65 20 72 65 66 | 65 72 65 6e 63 65 20 3a |t de ref|erence :|
|00001e10| 20 7c 3e 64 6f 63 3c 7c | 0a 2f 2f 09 4f 62 6a 65 | |>doc<||.//.Obje|
|00001e20| 74 20 3a 20 7c 3e 6f 62 | 6a 65 74 3c 7c 0a 2f 2f |t : |>ob|jet<|.//|
|00001e30| 0a 2f 2f 0a 2f 2f 20 0a | 2f 2f 20 68 69 73 74 6f |.//.// .|// histo|
|00001e40| 72 69 71 75 65 20 3a 0a | 2f 2f 20 7c 3e 64 61 74 |rique :.|// |>dat|
|00001e50| 65 3c 7c 09 7c 3e 61 75 | 74 65 75 72 3c 7c 09 7c |e<|.|>au|teur<|.||
|00001e60| 3e 6f 62 6a 65 74 3c 7c | 0a 2f 2f 0a 23 69 6e 63 |>objet<||.//.#inc|
|00001e70| 6c 75 64 65 20 22 4d 79 | 53 63 61 6e 6e 65 72 2e |lude "My|Scanner.|
|00001e80| 68 22 0a 23 69 6e 63 6c | 75 64 65 20 22 4d 79 50 |h".#incl|ude "MyP|
|00001e90| 61 72 73 65 72 2e 68 22 | 0a 0a 63 6c 61 73 73 20 |arser.h"|..class |
|00001ea0| 4d 79 43 6f 6d 70 69 6c | 65 72 20 3a 20 70 75 62 |MyCompil|er : pub|
|00001eb0| 6c 69 63 20 4d 79 50 61 | 72 73 65 72 0a 7b 70 72 |lic MyPa|rser.{pr|
|00001ec0| 69 76 61 74 65 3a 0a 20 | 4d 79 53 63 61 6e 6e 65 |ivate:. |MyScanne|
|00001ed0| 72 20 74 68 65 53 63 61 | 6e 6e 65 72 3b 0a 20 70 |r theSca|nner;. p|
|00001ee0| 75 62 6c 69 63 3a 0a 20 | 76 69 72 74 75 61 6c 20 |ublic:. |virtual |
|00001ef0| 69 6e 74 20 79 79 6c 65 | 78 28 29 3b 0a 20 76 69 |int yyle|x();. vi|
|00001f00| 72 74 75 61 6c 20 76 6f | 69 64 20 79 79 65 72 72 |rtual vo|id yyerr|
|00001f10| 6f 72 28 63 68 61 72 20 | 2a 6d 29 3b 0a 20 4d 79 |or(char |*m);. My|
|00001f20| 43 6f 6d 70 69 6c 65 72 | 28 29 20 0a 20 20 7b 7d |Compiler|() . {}|
|00001f30| 3b 0a 7d 3b 0a 0a 69 6e | 74 20 4d 79 43 6f 6d 70 |;.};..in|t MyComp|
|00001f40| 69 6c 65 72 3a 3a 79 79 | 6c 65 78 28 29 0a 7b 0a |iler::yy|lex().{.|
|00001f50| 20 79 79 6c 6c 6f 63 2e | 66 69 72 73 74 5f 6c 69 | yylloc.|first_li|
|00001f60| 6e 65 3d 74 68 65 53 63 | 61 6e 6e 65 72 2e 74 68 |ne=theSc|anner.th|
|00001f70| 65 4c 69 6e 65 3b 0a 20 | 79 79 6c 6c 6f 63 2e 66 |eLine;. |yylloc.f|
|00001f80| 69 72 73 74 5f 63 6f 6c | 75 6d 6e 3d 74 68 65 53 |irst_col|umn=theS|
|00001f90| 63 61 6e 6e 65 72 2e 74 | 68 65 43 6f 6c 75 6d 6e |canner.t|heColumn|
|00001fa0| 3b 0a 20 69 6e 74 20 74 | 6f 6b 65 6e 3d 74 68 65 |;. int t|oken=the|
|00001fb0| 53 63 61 6e 6e 65 72 2e | 79 79 6c 65 78 28 26 79 |Scanner.|yylex(&y|
|00001fc0| 79 6c 76 61 6c 2c 26 79 | 79 6c 6c 6f 63 29 3b 0a |ylval,&y|ylloc);.|
|00001fd0| 20 79 79 6c 6c 6f 63 2e | 6c 61 73 74 5f 6c 69 6e | yylloc.|last_lin|
|00001fe0| 65 3d 74 68 65 53 63 61 | 6e 6e 65 72 2e 74 68 65 |e=theSca|nner.the|
|00001ff0| 4c 69 6e 65 3b 0a 20 79 | 79 6c 6c 6f 63 2e 6c 61 |Line;. y|ylloc.la|
|00002000| 73 74 5f 63 6f 6c 75 6d | 6e 3d 74 68 65 53 63 61 |st_colum|n=theSca|
|00002010| 6e 6e 65 72 2e 74 68 65 | 43 6f 6c 75 6d 6e 3b 0a |nner.the|Column;.|
|00002020| 20 79 79 6c 6c 6f 63 2e | 74 65 78 74 3d 28 63 68 | yylloc.|text=(ch|
|00002030| 61 72 20 2a 29 74 68 65 | 53 63 61 6e 6e 65 72 2e |ar *)the|Scanner.|
|00002040| 79 79 74 65 78 74 3b 0a | 20 72 65 74 75 72 6e 20 |yytext;.| return |
|00002050| 74 6f 6b 65 6e 3b 0a 7d | 0a 0a 76 6f 69 64 20 4d |token;.}|..void M|
|00002060| 79 43 6f 6d 70 69 6c 65 | 72 3a 3a 79 79 65 72 72 |yCompile|r::yyerr|
|00002070| 6f 72 28 63 68 61 72 20 | 2a 6d 29 0a 7b 20 66 70 |or(char |*m).{ fp|
|00002080| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 25 64 |rintf(st|derr,"%d|
|00002090| 3a 20 25 73 20 61 74 20 | 74 6f 6b 65 6e 20 27 25 |: %s at |token '%|
|000020a0| 73 27 5c 6e 22 2c 79 79 | 6c 6c 6f 63 2e 66 69 72 |s'\n",yy|lloc.fir|
|000020b0| 73 74 5f 6c 69 6e 65 2c | 20 6d 2c 79 79 6c 6c 6f |st_line,| m,yyllo|
|000020c0| 63 2e 74 65 78 74 29 3b | 0a 7d 0a 0a 69 6e 74 20 |c.text);|.}..int |
|000020d0| 6d 61 69 6e 28 69 6e 74 | 20 61 72 67 63 2c 63 68 |main(int| argc,ch|
|000020e0| 61 72 20 2a 2a 61 72 67 | 76 29 0a 7b 0a 20 4d 79 |ar **arg|v).{. My|
|000020f0| 43 6f 6d 70 69 6c 65 72 | 20 61 43 6f 6d 70 69 6c |Compiler| aCompil|
|00002100| 65 72 3b 0a 20 69 6e 74 | 20 72 65 73 75 6c 74 3d |er;. int| result=|
|00002110| 61 43 6f 6d 70 69 6c 65 | 72 2e 79 79 70 61 72 73 |aCompile|r.yypars|
|00002120| 65 28 29 3b 0a 20 70 72 | 69 6e 74 66 28 22 52 65 |e();. pr|intf("Re|
|00002130| 73 75 6c 74 61 74 20 50 | 61 72 73 69 6e 67 3d 25 |sultat P|arsing=%|
|00002140| 73 5c 6e 22 2c 72 65 73 | 75 6c 74 3f 22 45 72 72 |s\n",res|ult?"Err|
|00002150| 65 75 72 22 3a 22 4f 4b | 22 29 3b 0a 20 72 65 74 |eur":"OK|");. ret|
|00002160| 75 72 6e 20 30 3b 0a 7d | 3b 0a 0a 0a |urn 0;.}|;... |
+--------+-------------------------+-------------------------+--------+--------+